﻿using System;
using TIS.DAO;

namespace TIS.UserControl
{
    public partial class Menu : System.Web.UI.UserControl
    {
        CategoryDAO _categoryDao = new CategoryDAO();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["lang"] == null)
                {
                    Session["lang"] = 1;

                }
                BindMenu();
            }

        }

        public void BindMenu()
        {

            string lang = Session["lang"].ToString();
            rpMenu.DataSource = _categoryDao.GetMenu(int.Parse(lang));
            rpMenu.DataBind();

        }
    }
}